package com.wkbb.basic.enums;

/**
 * @author lizhichao
 * @date 2019/11/13
 * @description
 */
public enum YouTuOperateTypeEnum {

    //操作类型
    YOU_TU_OPERATE_ADD_PERSON(1,"添加个体"),
    YOU_TU_OPERATE_DELETE_PERSON(2,"删除个体"),
    YOU_TU_OPERATE_ADD_FACE(3,"添加人脸"),
    YOU_TU_OPERATE_DELETE_FACE(4,"删除人脸"),
    YOU_TU_OPERATE_ADD_USER_FACE(5,"人脸录入");

    private Integer code;

    private String desc;

    YouTuOperateTypeEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    // 普通方法
    public static String getDesc(short code) {
        for (YouTuOperateTypeEnum c : YouTuOperateTypeEnum.values()) {
            if (c.getCode() == code) {
                return c.desc;
            }
        }
        return null;
    }

    public Integer getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }
}
